// 引入组件
export default [
  // 论坛首页，包括话题广场、教师资源分享和新生可了解
  {
    path: "/myhome",
    name: "myhome",
    // component: Test,
    //路由懒加载，当路由被调用时，才会将这个组件挂载上去，提高了效率。
    component: () => import("@/views/MyHome"),
    children: [
      {
        path: "/",
        redirect: "/myhome/topicsquare",
      },
      {
        path: "/myhome/topicsquare",
        name: "topicsquare",
        //路由懒加载，当路由被调用时，才会将这个组件挂载上去，提高了效率。
        component: () => import("@/views/MyHome/TopicSquare"),
        meta: {
          keepAlive: true, //是否缓存
        },
      },
      {
        path: "/myhome/newstudent",
        name: "newstudent",
        //路由懒加载，当路由被调用时，才会将这个组件挂载上去，提高了效率。
        component: () => import("@/views/MyHome/NewStudent"),
      },
      {
        path: "/myhome/teachershare",
        name: "teachershare",
        //路由懒加载，当路由被调用时，才会将这个组件挂载上去，提高了效率。
        component: () => import("@/views/MyHome/TeacherShare"),
      },
    ],
  },
  //个人主页，包括帖子、点赞、评论、好友和消息
  {
    path: "/homepage",
    name: "homepage",
    component: () => import("@/views/HomePage"),
    children: [
      {
        path: "/",
        redirect: "/homepage/mypost",
      },
      {
        path: "/homepage/mypost",
        name: "mypost",
        component: () => import("@/views/HomePage/MyPost"),
      },
      {
        path: "/homepage/friend",
        name: "friend",
        component: () => import("@/views/HomePage/Friend"),
      },
      {
        path: "/homepage/letter",
        name: "letter",
        component: () => import("@/views/HomePage/Letter"),
        children: [
          {
            path: "/",
            redirect: "/homepage/letter/comment",
          },
          {
            path: "/homepage/letter/comment",
            name: "letter-comment",
            component: () => import("@/views/HomePage/Letter/Comment"),
          },
          {
            path: "/homepage/letter/friend",
            name: "letter-friend",
            component: () => import("@/views/HomePage/Letter/Friend"),
          },
          {
            path: "/homepage/letter/chat",
            name: "letter-chat",
            redirect: "/took",
          },
          {
            path: "/homepage/letter/praise",
            name: "letter-praise",
            component: () => import("@/views/HomePage/Letter/Praise"),
            children: [
              {
                path: "/",
                redirect: "/homepage/letter/praise/post",
              },
              {
                path: "/homepage/letter/praise/post",
                name: "letter-praise-post",
                component: () => import("@/views/HomePage/Letter/Praise/Post"),
              },
              {
                path: "/homepage/letter/praise/comment",
                name: "letter-praise-comment",
                component: () =>
                  import("@/views/HomePage/Letter/Praise/Comment"),
              },
            ],
          },
        ],
      },
      {
        path: "/homepage/mycomment",
        name: "mycomment",
        component: () => import("@/views/HomePage/MyComment"),
      },
      {
        path: "/homepage/mypraise",
        name: "mypraise",
        component: () => import("@/views/HomePage/MyPraise"),
        children: [
          {
            path: "/",
            redirect: "/homepage/mypraise/post",
          },
          {
            path: "/homepage/mypraise/post",
            name: "mycomment",
            component: () => import("@/views/HomePage/MyPraise/Post"),
          },
          {
            path: "/homepage/mypraise/comment",
            name: "mycomment",
            component: () => import("@/views/HomePage/MyPraise/Comment"),
          },
        ],
      },
    ],
  },
  {
    path: "/search",
    name: "search",
    component: () => import("@/views/Search"),
    children: [
      {
        path: "/",
        redirect: "/search/tsquare",
      },
      {
        path: "/search/tsquare",
        name: "tsquare",
        component: () => import("@/views/Search/tSquare"),
      },
      {
        path: "/search/tshare",
        name: "tshare",
        component: () => import("@/views/Search/tShare"),
      },
      {
        path: "/search/nstudent",
        name: "nstudent",
        component: () => import("@/views/Search/nStudent"),
      },
      {
        path: "/search/users",
        name: "users",
        component: () => import("@/views/Search/Users"),
      },
    ],
  },
  {
    path: "/post",
    name: "post",
    component: () => import("@/views/Post"),
  },
  {
    path: "/took",
    name: "took",
    component: () => import("@/views/Took"),
  },
  {
    path: "/login",
    name: "login",
    component: () => import("@/views/Login"),
  },
  {
    path: "/lookpost",
    name: "lookpost",
    component: () => import("@/views/LookPost"),
  },
  {
    path: "/lookpost/:articleId",
    name: "根据文章id查看详情",
    component: () => import("@/views/LookPost"),
  },
  {
    path: "*",
    redirect: "/myhome",
  },
  {
    path: "/admin",
    name: "学生列表管理",
    component: () => import("@/views/Admin"),
    children: [
      {
        path: "/",
        redirect: "/admin/student",
      },
      {
        path: "/admin/student",
        name: "学生列表管理",
        component: () => import("@/views/Admin/User/Student"),
      },
      {
        path: "/admin/student/add",
        name: "学生列表管理",
        component: () => import("@/views/Admin/User/Student/add"),
      },
      {
        path: "/admin/teacher",
        name: "教师列表管理",
        component: () => import("@/views/Admin/User/Teacher"),
      },
      {
        path: "/admin/post1",
        name: "话题广场列表管理",
        component: () => import("@/views/Admin/Post/Post1"),
      },
      {
        path: "/admin/post2",
        name: "教师资源分享列表管理",
        component: () => import("@/views/Admin/Post/Post2"),
      },
      {
        path: "/admin/post3",
        name: "新生可了解列表管理",
        component: () => import("@/views/Admin/Post/NewStudent"),
      },
      {
        path: "/admin/comment",
        name: "评论列表管理",
        component: () => import("@/views/Admin/Comment"),
      },
      {
        path: "/admin/teacher/add",
        name: "教师列表管理",
        component: () => import("@/views/Admin/User/Teacher/add"),
      },
      {
        path: "/admin/tipoff/post",
        name: "帖子举报管理",
        component: () => import("@/views/Admin/TipOff/Post"),
      },
      {
        path: "/admin/tipoff/comment",
        name: "评论举报管理",
        component: () => import("@/views/Admin/TipOff/Comment"),
      },
      {
        path: "/admin/tipoff/user",
        name: "评论举报管理",
        component: () => import("@/views/Admin/TipOff/User"),
      },
    ],
  },
  {
    path: "/interestchoice",
    name: "interestChoice",
    component: () => import("@/views/InterestChoice"),
  },
  // {
  //   path: "/interestchoice/test",
  //   name: "interestChoice/test",
  //   component: () => import("@/views/InterestChoice/test"),
  // },
  {
    path: "/imgchoice",
    name: "imgchoice",
    component: () => import("@/views/ImgChoice"),
  },
  {
    path: "/test",
    name: "test",
    component: () => import("@/views/Test"),
  },
];
